public class SumAll {
    public static void main(String[] args) {
        int a = sum(100);
        System.out.println("a = " + a);
    }

    public static int sum(int n) {
        if (n == 1) {
            return 1;
        } else {
            return n + sum(n - 1);
        }
    }
}
